package managedbeans;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

@ManagedBean()
@RequestScoped
public class BeanTeste {

	private Integer i = 2;
    private String var = "[['Gabiate', 7.5],['Gervasio', 4],['Olives', 1], ['Zucchini', 1],['Pepperoni', 2]]";  

	public String a() {
		return "<script type='text/javascript'> "
				+ "google.load('visualization', '1', {packages:['corechart']})"
				+ "google.setOnLoadCallback(drawChart);"
				+ "function drawChart() {"
				+ "var data = new google.visualization.DataTable();"
				+ "data.addColumn('string', 'Task');"
				+ "data.addColumn('number', 'Hours per Day');"
				+ "data.addRows(2);"
				+ "data.setValue(0, 0, 'Work');"
				+ "data.setValue(0, 1, 11);"
				+ "data.setValue(1, 0, 'Eat');"
				+ "data.setValue(1, 1, 2);"
				+ "var chart = new google.visualization.PieChart(document.getElementById('chart_div'));"
				+ "chart.draw(data, {width: 450, height: 300, title: 'My Daily Activities'}); }  </script>";
	}

	public Integer getI() {
		return i;
	}

	public void setI(Integer i) {
		this.i = i;
	}

	public String getVar() {
		return var;
	}

	public void setVar(String var) {
		this.var = var;
	}
	
	

}
